from django.urls import path
from note import views

urlpatterns = [
    path('login/', views.NoteViewSet.as_view({'get': 'login'})),
    path('', views.NoteViewSet.as_view({'get': 'list', 'post': 'create'})),
    path('<int:pk>/', views.NoteViewSet.as_view({'get': 'retrieve', 'put': 'update', 'delete': 'destroy'})),
    path('recycle/<int:id>/', views.NoteViewSet.as_view({'delete': 'recycle'})),
    path('cance_recy/<int:id>/', views.NoteViewSet.as_view({'get': 'cancel_recycling'})),

    path('dir/<int:id>/', views.ReadNoteViewSet.as_view({'get': 'get_notes_by_dir'})),
    path('user/<int:id>/', views.ReadNoteViewSet.as_view({'get': 'get_notes_by_user'})),
    path('curuser/', views.ReadNoteViewSet.as_view({'get': 'get_notes_by_curuser'})),
    path('tree/user/<int:id>/', views.ReadNoteViewSet.as_view({'get': 'get_notes_tree_by_user'})),
    path('tree/curuser/', views.ReadNoteViewSet.as_view({'get': 'get_notes_tree_by_curuser'})),
]
